<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="author" content="wangbo">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>react 第一章</title>
    <style>
        .myclass{
            color: red;
        }
    </style>
</head>
<body>
    <div id="app"></div>
    <!-- 顺序有要求 -->
    <script type="text/javascript" src="../js/react.development.js"></script>
    <!-- dom依赖于react.development.js -->
    <script type="text/javascript" src="../js/react-dom.development.js"></script>
    <script type="text/javascript">    
     /* 创建的语法 */
    // let ele = React.creactElement(
    //     type 标签的名字
    //     {},属性的对象
    //     [] 包含的节点
    // ) 
    /* 创建的 ele 标签对象 挂载或者是渲染到哪里 */
    /* ReactDOM.render(< ele />,document.getElementById("app")) */
    let myh1 = React.createElement('h1',{className:'myclass',id:"myid"},"我是h1"); 
    ReactDOM.render(myh1,document.getElementById("app"))
    </script>
</body>
</html>